import 'package:flutter/material.dart';
import 'package:love_app/providers/home_page_provider.dart';
import 'package:love_app/pages/home_page/first_ui/top_box.dart';
import 'package:provider/provider.dart';

class FirstPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Consumer<HomePageProvider>(
      builder: (context, HomePageProvider homePageMode, Widget child) =>
          Container(
        key: ValueKey<int>(homePageMode.count),
        child: child,
      ),
      child: Scaffold(
        body: _body(),
        backgroundColor: Color.fromRGBO(250, 247, 248, 1),
      ),
    );
  }

  // Widget _body() {
  //   return Column(
  //     mainAxisAlignment: MainAxisAlignment.start,
  //     mainAxisSize: MainAxisSize.max,
  //     children: <Widget>[
  //       FirstTopBox(),
  //     ],
  //   );
  // }

  Widget _body() {
    return Scrollbar(
      child: SingleChildScrollView(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.start,
          mainAxisSize: MainAxisSize.max,
          children: <Widget>[
            FirstTopBox(),
          ],
        ),
      ),
    );
  }
}
